package co.edu.usbcali.egrapico.vista.tools;

import co.edu.usbcali.egrapico.vista.FrmPrincipal;
import co.edu.usbcali.egrapico.vista.ambient.*;

public class JPanelTranferHandlerContext extends StringTransferHandler {

    protected void importString(javax.swing.JComponent c, String str) {
        PanelContext target = (PanelContext) c;
        try {
            target.setSelected(true);
        } catch (java.beans.PropertyVetoException e) {
        }

        javax.swing.ImageIcon I0 = new javax.swing.ImageIcon(getClass().getResource("/co/edu/usbcali/egrapico/images/program.gif"));
        javax.swing.ImageIcon I11 = new javax.swing.ImageIcon(getClass().getResource("/co/edu/usbcali/egrapico/images/variable.gif"));
        javax.swing.ImageIcon I13 = new javax.swing.ImageIcon(getClass().getResource("/co/edu/usbcali/egrapico/images/method.gif"));
        LabelProgram labe0 = new LabelProgram();
        LabelContext label = new LabelContext();
        LabelAsk label2 = new LabelAsk();
        LabelTell label3 = new LabelTell();
        LabelMsgSend label4 = new LabelMsgSend();
        LabelIdeOpe label6 = new LabelIdeOpe();
        LabelObject label5 = new LabelObject();
        LabelMethod label7 = new LabelMethod();
        if (str.equals("Program") && target.getPrograms() < 1) {
            labe0.setIcon(I0);
            labe0.setHorizontalTextPosition(javax.swing.JLabel.CENTER);
            labe0.setVerticalTextPosition(javax.swing.JLabel.BOTTOM);
            labe0.setName(str);
            labe0.setLocation(target.getLPane().getMousePosition());
            labe0.setSize(90, 90);
            target.addLayeredPane(labe0);
        } else if (str.equals("Variable")) {
            label6.setIcon(I11);
            label6.setHorizontalTextPosition(javax.swing.JLabel.CENTER);
            label6.setVerticalTextPosition(javax.swing.JLabel.BOTTOM);
            label6.setName(str);
            label6.setId("id2");
            label6.setLocation(target.getLPane().getMousePosition());
            label6.setSize(90, 90);
            target.addLayeredPane(label6);
        } else if (FrmPrincipal.esMetodo(str)) {
            label7.setIcon(I13);
            label7.setHorizontalTextPosition(javax.swing.JLabel.CENTER);
            label7.setVerticalTextPosition(javax.swing.JLabel.BOTTOM);
            label7.setName(str);
            label7.setLocation(target.getLPane().getMousePosition());
            label7.setSize(95, 90);
            target.addLayeredPane(label7);
        }
    }
}
